<?xml version="1.0"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Model</Title>
      <Description>Expansion snippet for a Model</Description>
      <Shortcut>model</Shortcut>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>namespace</ID>
          <ToolTip>Model namespace</ToolTip>
          <Default>MbUnitTests</Default>
        </Literal>
        <Literal>
          <ID>type</ID>
          <ToolTip>Modelled type</ToolTip>
          <Default>Put the modelled type here</Default>
        </Literal>
        <Literal>
          <ID>basetype</ID>
          <ToolTip>Modelled Base Type</ToolTip>
          <Default>Object</Default>
        </Literal>
      </Declarations>
      <Code Language="VB"><![CDATA[Imports System
Imports TestFu
Imports TestFu.Models

Namespace $namespace$
    ''' <summary>
    ''' A IModel implementation for the $type$ type.
    ''' </summary>
	' <State("Put a state name here")>
    ' <SubModel("Put a submodel name here")>
    <Model(GetType($type$))> _    
    Public Class $type$Model
		Inherits $basetype$Model

        #Region "Constructors"
        ''' <summary>
        ''' Initializes a new $type$Model instance.
        ''' </summary>
        Public Sub New()

		End Sub
    
        ''' <summary>
        ''' Initializes a new "$name$Model" instance to model the modelledType type.
        ''' </summary>
        ''' <param name="modelledType">
        ''' Target Type of the model
        ''' </param>
        Public Sub New(ByVal modelledType As Type)
			MyBase.New(modelledType)
            If Not GetType($type$).IsAssignableFrom(modelledType)
                Throw New ArgumentException("$type$ is not assignable from "+modelledType.FullName,"modelledType")
			End If
        End Sub   
        #End Region
    
        #Region "Transitions"
        <Transition()> _
        Public Sub SampleTransition(ByVal target As $type$)
            Throw New NotImplementedException()
        End Sub
     
        ''' <summary>
        ''' Gets the active ITransition instance for current target.
        ''' </summary>
        ''' <param name="transitions">
        ''' Collection of active ITransition names
        ''' </param>
        ''' <param name="target">
        ''' Current tested instance
        ''' </param>
        Protected Overrides Sub GetActiveTransitions( _
            ByVal transitions as ITransitionNameCollection , _
            ByVal target as Object)

            MyBase.GetActiveTransitions(transitions,target)
            Dim current As $type$ = DirectCast(target, $type$)

		End Sub
        #End Region
    End Class
End Namespace
	]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>